import React from "react";
import Index from "../components/business/Index";
import Login from "../components/business/Login";
import Register from "../components/business/Register";
import Profile from "../components/business/Profile";
import Email from "../components/business/email";
import Feedback from "../components/business/Feedback";
import About from "../components/business/About";

const list = [
  {
    path: "index",
    name: "BusinessIndex",
    component: Index,
    auth: true,
  },
  {
    path: "login",
    name: "BusinessLogin",
    component: Login,
    auth: false,
  },
  {
    path: "register",
    name: "BusinessRegister",
    component: Register,
    auth: false,
  },
  {
    path: "profile",
    name: "BusinessProfile",
    component: Profile,
    auth: false,
  },
  {
    path: "email",
    name: "BusinessEmail",
    component: Email,
    auth: false
  },
  {
    path: "feedback",
    name: "BusinessFeedback",
    component: Feedback,
    auth: false
  },
  {
    path: "about",
    name: "BusinessAbout",
    component: About
  }
];

const layout = () => {
  return (
    <>
      {/* 显示子级路由 */}
      <React.Router.Outlet />
    </>
  );
};

const RouterList = [
  {
    path: "/business",
    name: "Business",
    component: layout,
    children: list,
  },
];

export default RouterList;
